package com.estate.business.impl;

import java.util.List;

import com.estate.business.ManageProjectService;
import com.estate.dao.ManageProjectDao;
import com.estate.vo.Vo;
import com.estate.vo.impl.ManageProjectVo;

public class ManageProjectServiceImpl implements ManageProjectService {
	
	private ManageProjectDao manageProjectDao;

	public void addManageProject(ManageProjectVo manageProjectVo) {
		manageProjectDao.addVo(manageProjectVo);
	}

	public List<Vo> findAllManageProject() {
		return manageProjectDao.findAll();
	}

	public List<Vo> findManageProjectByRecordUser(int recordUserId) {
		return this.manageProjectDao.findByRecordUserId(recordUserId);
	}

	public List<Vo> findManageProjectByState(int state) {
		return this.manageProjectDao.findByState(state);
	}
	
	public Vo getManageProjectByPK(Integer pk) {
		Vo manageProject = manageProjectDao.findByPK(pk);
		return manageProject;
	}
	
	public boolean deleteManageProjectVo(ManageProjectVo manageProject) {
		boolean result = false;
		result = this.getManageProjectDao().deleteVo(manageProject);
		return result;
	}

	public void setManageProjectDao(ManageProjectDao manageProjectDao) {
		this.manageProjectDao = manageProjectDao;
	}

	public ManageProjectDao getManageProjectDao() {
		return manageProjectDao;
	}

	public boolean updateManageProjectVo(ManageProjectVo manageProject) {
		boolean result = false;
		result = this.getManageProjectDao().updateVo(manageProject);
		return result;
	}

	public boolean deleteManageProjectVoByPK(Integer pk) {
		Vo vo = this.getManageProjectDao().findByPK(pk);
		this.getManageProjectDao().deleteVo(vo);
		return false;
	}

	public String getImplPlanById(int id) {
		// TODO Auto-generated method stub
		ManageProjectVo vo=(ManageProjectVo)this.getManageProjectDao().findByPK(id);
		return vo.getImplPlan();
	}

	public String getImplProgramById(int id) {
		// TODO Auto-generated method stub
		ManageProjectVo vo=(ManageProjectVo)this.getManageProjectDao().findByPK(id);
		return vo.getImplPlan();
	}

	
	

	

}
